Scroll valuators were being just appended again and again, leading
to 1) a growing memory issue anytime a device changed 2) the first
scroll valuators to stay permanent on the application lifetime, as
the first stored valuators would always match.
https://bugzilla.gnome.org/show_bug.cgi?id=705203
}
}
+void
+_gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device)
+{
+ if (device->scroll_valuators->len > 0)
+ g_array_remove_range (device->scroll_valuators, 0,
+ device->scroll_valuators->len);
+}
+
gint
_gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
{
if (device)
{
_gdk_device_reset_axes (device);
+ _gdk_device_xi2_unset_scroll_valuators ((GdkX11DeviceXI2 *) device);
translate_device_classes (display, device, ev->classes, ev->num_classes);
g_signal_emit_by_name (G_OBJECT (device), "changed");
XIButtonState *buttons_state,
XIGroupState *group_state);
gint _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device);
+void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device);
+
GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2,
gint device_id);